//
//  DJMyCreatorCenterCViewController.m
//  daojiVideo
//
//  Created by tikeios_002 on 2024/5/29.
//

#import "DJMyCreatorCenterCViewController.h"
#import "CSJADLoading.h"
#import "TFCreationNoticesView.h"
#import "DJMyWallVC.h"
#import "DJMyOpenCreatorVC.h"
#import "DJUploadVC.h"
#import "QZMyDetailsPlayVC.h"
#import "QZHongBaoDetailsVC.h"

@interface DJMyCreatorCenterCViewController ()
@property (weak, nonatomic) IBOutlet UIScrollView *mainView;

@property (weak, nonatomic) IBOutlet UIView *adView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *adHeight;
@property (weak, nonatomic) IBOutlet UIView *systemNotifitionBg;
@property (weak, nonatomic) IBOutlet UILabel *playNumber;
@property (weak, nonatomic) IBOutlet UILabel *fansNumber;
@property (weak, nonatomic) IBOutlet UILabel *likeNumber;
@property (weak, nonatomic) IBOutlet UILabel *daoqi_money;
@property (weak, nonatomic) IBOutlet UIView *daoqi_money_view;
@property (weak, nonatomic) IBOutlet UILabel *youxiao_money;
@property (weak, nonatomic) IBOutlet UIView *youxiao_money_view;
@property (weak, nonatomic) IBOutlet UIView *daoqi_time_view;
@property (weak, nonatomic) IBOutlet UILabel *daoqi_time;
@property (weak, nonatomic) IBOutlet UILabel *daoqi_money_title;

@property (weak, nonatomic) IBOutlet UIView *show_video_view;
@property (weak, nonatomic) IBOutlet UILabel *show_title;
@property (weak, nonatomic) IBOutlet UIImageView *show_image;
@property (weak, nonatomic) IBOutlet UILabel *show_time;
@property (weak, nonatomic) IBOutlet UILabel *show_content;
@property (weak, nonatomic) IBOutlet UILabel *show_currTime;
@property (weak, nonatomic) IBOutlet UILabel *show_paly;
@property (weak, nonatomic) IBOutlet UILabel *show_comment;
@property (weak, nonatomic) IBOutlet UILabel *show_like;
@property (weak, nonatomic) IBOutlet UIView *show_footView;
@property (weak, nonatomic) IBOutlet UILabel *show_tip;

@property (weak, nonatomic) IBOutlet UIView *upView;
@property (weak, nonatomic) IBOutlet UILabel *upTitle;
@property (weak, nonatomic) IBOutlet UIButton *upButt;
@property (weak, nonatomic) IBOutlet UIButton *allButt;

@property (weak, nonatomic) IBOutlet UIView *openTipView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *openTipBotton;
@property (weak, nonatomic) IBOutlet UILabel *youxiao_title;

//全额返活
@property (weak, nonatomic) IBOutlet UIView *qe_showView;
@property (weak, nonatomic) IBOutlet UIView *qe_qd_showView;
@property (weak, nonatomic) IBOutlet UILabel *qe_qd_name;
@property (weak, nonatomic) IBOutlet UILabel *qe_qd_tip;
@property (weak, nonatomic) IBOutlet UILabel *qe_qd_number;
@property (weak, nonatomic) IBOutlet UIButton *qe_qd_status;
@property (weak, nonatomic) IBOutlet UIView *qe_hy_showView;
@property (weak, nonatomic) IBOutlet UILabel *qe_hy_name;
@property (weak, nonatomic) IBOutlet UILabel *qe_hy_tip;
@property (weak, nonatomic) IBOutlet UILabel *qe_hy_number;
@property (weak, nonatomic) IBOutlet UIButton *qe_hy_status;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *qe_height;


@property (strong, nonatomic) TFCreationNoticesView *systemNotifitionView;
@property (assign, nonatomic) int timerNumber;
@property (strong, nonatomic) NSDictionary * videoData;
@property (strong, nonatomic) NSString * nickname;
@end

@implementation DJMyCreatorCenterCViewController

-(void)showTextViewNavViewTo1{
    NSMutableArray * showTextViewNavViewNameArrTo1 = [NSMutableArray new];
    UIView * showTextViewNavViewViewTo1 = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    showTextViewNavViewViewTo1.clipsToBounds = YES;
       UILabel * oldshowSSSSTip = [[UILabel alloc]init];
    oldshowSSSSTip.clipsToBounds = YES;
    oldshowSSSSTip.text = @"kass显示区";
    oldshowSSSSTip.textColor = ColorHex(@"#f0f0f0");
    oldshowSSSSTip.textAlignment = NSTextAlignmentCenter;
    oldshowSSSSTip.font = [UIFont systemFontOfSize:28];
    oldshowSSSSTip.hidden = YES;
    [self.view addSubview:oldshowSSSSTip];
    [self.view addSubview:showTextViewNavViewViewTo1];
    UILabel * showTextViewNavViewLabelTo1 = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 100)];
    NSInteger showTextViewNavViewNumberTo1 = arc4random_uniform(20);
    NSLog(@"：%ld", (long)showTextViewNavViewNumberTo1);
    showTextViewNavViewLabelTo1.text = [NSString stringWithFormat:@"%ld",(long)showTextViewNavViewNumberTo1];
    [showTextViewNavViewLabelTo1 addSubview:showTextViewNavViewLabelTo1];
    
    UIImageView * showTextViewNavViewLabelTo2 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 100, 100)];
    [showTextViewNavViewViewTo1 addSubview:showTextViewNavViewLabelTo2];
    
}
- (void)publicVideo:(QZVideoModel *)data type:(QZDataUpdateType)type{
    [self homeDatasRequest];
}
- (void)showOldAddNavViewToMainOldView1{
    UIView * oldBgSS = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    oldBgSS.clipsToBounds = YES;
       UILabel * oldshowSSSSTip = [[UILabel alloc]init];
    oldshowSSSSTip.clipsToBounds = YES;
    oldshowSSSSTip.text = @"kass显示区";
    oldshowSSSSTip.textColor = ColorHex(@"#f0f0f0");
    oldshowSSSSTip.textAlignment = NSTextAlignmentCenter;
    oldshowSSSSTip.font = [UIFont systemFontOfSize:28];
    oldshowSSSSTip.hidden = YES;
    [self.view addSubview:oldshowSSSSTip];
    [self.view addSubview:oldBgSS];
    
    UIButton * sendBtn = [[UIButton alloc]initWithFrame:CGRectMake(KScreen_W-75, kStatusBarHeight+10, 60, 46)];
    sendBtn.layer.cornerRadius = 3;
    sendBtn.backgroundColor = [UIColor whiteColor];
    [sendBtn setTitle:@"发送" forState:UIControlStateNormal];
    [sendBtn setTitleColor:ColorHex(@"#333333") forState:UIControlStateNormal];
    sendBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    [sendBtn addTarget:self action:@selector(sendTap) forControlEvents:UIControlEventTouchUpInside];
    [oldBgSS addSubview:sendBtn];
    
    UIView * sendBg = [[UIView alloc]initWithFrame:CGRectMake(15, kStatusBarHeight+66, KScreen_W-30, (KScreen_H-KSafeAreaBottomHeight-25-(kStatusBarHeight+66))/2)];
    sendBg.backgroundColor = [UIColor whiteColor];
    sendBg.layer.cornerRadius = 3;
    [oldBgSS addSubview:sendBg];
    
    UILabel * sendTip = [[UILabel alloc]initWithFrame:CGRectMake(0, (sendBg.frame.size.height-40)/2, sendBg.frame.size.width, 40)];
    sendTip.text = @"发送区";
    sendTip.textColor = ColorHex(@"#f0f0f0");
    sendTip.textAlignment = NSTextAlignmentCenter;
    sendTip.font = [UIFont systemFontOfSize:28];
    [sendBg addSubview:sendTip];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = NSLocalizedString(@"创作中心", nil);
    if([[QZUserInfoModel share].iscreator boolValue]){
        KWeakSelf
        [CSJADLoading share].BannerAdsLoadFish = ^(id  _Nullable bannerView) {
            if(bannerView != nil && weakSelf.adView){
                [weakSelf.adView addSubview:bannerView];
                weakSelf.adHeight.constant = 45;
                [bannerView mas_makeConstraints:^(MASConstraintMaker *make) {
                    make.edges.equalTo(weakSelf.adView);
                }];
                [UIView animateWithDuration:0.3 animations:^{
                    [weakSelf.view layoutIfNeeded];
                }];
            }
        };
        [CSJADLoading ADBannerAdRequest:self];
    }
    self.daoqi_time_view.backgroundColor = MainColor;
    self.daoqi_time_view.layer.cornerRadius = 4;
    self.daoqi_money_view.layer.cornerRadius = 8;
    self.daoqi_money_view.backgroundColor = subviewback_black;
    self.youxiao_money_view.layer.cornerRadius = 8;
    self.youxiao_money_view.backgroundColor = subviewback_black;
    self.show_video_view.layer.cornerRadius = 8;
    self.show_video_view.backgroundColor = subviewback_black;
    self.show_image.layer.cornerRadius = 4;
    self.show_time.layer.cornerRadius = 4;
    self.show_time.layer.maskedCorners = kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner;
    
    self.upView.layer.cornerRadius = 8;
    self.upView.clipsToBounds = YES;
    self.upView.backgroundColor = subviewback_black;
    self.upButt.layer.cornerRadius = 12;
    self.upButt.clipsToBounds = YES;
    self.upButt.backgroundColor = MainColor;
    
    self.allButt.hidden = YES;
    
    self.qe_showView.layer.cornerRadius = 12;
    self.qe_showView.clipsToBounds = YES;
    self.qe_showView.backgroundColor = subviewback_black;
    self.qe_qd_status.layer.cornerRadius = 18;
    self.qe_qd_status.clipsToBounds = YES;
    self.qe_hy_status.layer.cornerRadius = 18;
    self.qe_hy_status.clipsToBounds = YES;
    self.qe_qd_number.textColor = MainColor;
    
    
//    self.systemNotifition.direction = ZBCycleVerticalViewScrollDirectionUp;
//    self.systemNotifition.block = ^(NSInteger index) {
//        NSLog(@"%ld",(long)index);
//        [[BSystemAlert shared] showAlertWithTitle:NSLocalizedString(@"温馨提示", nil) message:NSLocalizedString(@"是否确定要退出登录吗？", nil) userData:nil cancelTitle:NSLocalizedString(@"取消", nil) actions:@[NSLocalizedString(@"退出", nil)] actionBlock:^(id  _Nonnull userData, NSString * _Nonnull actionTitle) {
//            if ([actionTitle isEqualToString:NSLocalizedString(@"退出", nil)]) {
//                KMutableDic(sendDic)
//                [YBNetBase userLogoffRequest:sendDic successBlock:^(NSDictionary * _Nonnull data, NSInteger code, NSString * _Nonnull msg) {
//                    if(code == 200){
//                        [QZUserInfoModel cleanUserData];
//                        [YBMsgPop showPop:@"账号已退出"];
//                        [weakSelf saveToken];
//                    }else{
//                        [YBMsgPop showPop:msg];
//                    }
//                }];
//            }
//        }];
//    };
    [self homeDatasRequest];
    [[QZDataUpdate share] addListenerObj:self];
}
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.systemNotifitionView noticeScroll];
    [self homeDatasRequest];
}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.systemNotifitionView cancelAfter];
    [self.systemNotifitionView cancelAnimator];
}
- (TFCreationNoticesView *)systemNotifitionView{
    if(_systemNotifitionView == nil){
        _systemNotifitionView = [[NSBundle mainBundle] loadNibNamed:@"TFCreationNoticesView" owner:self options:nil].lastObject;
        _systemNotifitionView.noticeHeight = 40;
        [self.systemNotifitionBg addSubview:_systemNotifitionView];
        [_systemNotifitionView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.top.right.bottom.mas_equalTo(0);
        }];
        _systemNotifitionView.CreatorCenterNoticesActionBlock = ^(NSInteger index, NSString * _Nonnull title, NSString * _Nonnull content) {
            [[BSystemAlert shared] showAlertWithTitle:content message:nil userData:nil cancelTitle:NSLocalizedString(@"知道了", nil) actions:@[] actionBlock:^(id  _Nonnull userData, NSString * _Nonnull actionTitle) {
                
            }];
        };
    }
    return _systemNotifitionView;
}
- (void)homeDatasRequest{
    KWeakSelf
    KMutableDic(sendDic)
    [YBNetBase memberCreatorHomeRequest:sendDic successBlock:^(NSDictionary * _Nonnull data, NSInteger code, NSString * _Nonnull msg) {
        if(code == 200){
            weakSelf.systemNotifitionView.cellDatas = data[@"notice"];
            weakSelf.playNumber.text = [NSString stringWithFormat:@"%@",data[@"playData"][@"total_play_num_str"]];
            weakSelf.fansNumber.text = [NSString stringWithFormat:@"%@",data[@"playData"][@"total_fans_num_string"]];
            weakSelf.likeNumber.text = [NSString stringWithFormat:@"%@",data[@"playData"][@"total_like_num_string"]];
            if([[QZUserInfoModel share].iscreator intValue] == 1){
                weakSelf.openTipView.hidden = YES;
                weakSelf.openTipBotton.constant = -40;
                
                weakSelf.daoqi_time_view.hidden = YES;
                weakSelf.daoqi_money_title.text = @"昨日收益";
                weakSelf.daoqi_money.text = [NSString stringWithFormat:@"%.2f",[data[@"playData"][@"yesterday_income"] floatValue]];
                weakSelf.youxiao_title.text = @"当前可提";
                weakSelf.youxiao_money.text = [NSString stringWithFormat:@"%.2f",[data[@"playData"][@"normal_amount"] floatValue]];
                weakSelf.show_title.text = @"最新作品";
            }else{
                weakSelf.openTipView.hidden = NO;
                weakSelf.openTipBotton.constant = 10;
                weakSelf.youxiao_title.text = @"预计收益";
                weakSelf.youxiao_money.text = [NSString stringWithFormat:@"%.2f",[data[@"play_money"] floatValue]];
                weakSelf.daoqi_money.text = [NSString stringWithFormat:@"%.2f",[data[@"expire_play_money"] floatValue]];
                if([data[@"play_money"] floatValue] > 0 && [data[@"expire_remain_time"] floatValue] > 0){
                    weakSelf.timerNumber = [data[@"expire_remain_time"] intValue];
                    if(weakSelf.daoqi_time_view.hidden){
                        weakSelf.daoqi_time_view.hidden = NO;
                        [weakSelf showDaoQiTimeTap];
                    }
                }
                weakSelf.show_title.text = @"潜力作品";
            }
            //作品
            if([data[@"videoData"] count] > 0){
                weakSelf.nickname = data[@"nickname"];
                weakSelf.videoData = data[@"videoData"][0];
                weakSelf.show_video_view.hidden = NO;
                weakSelf.upView.hidden = YES;

                [weakSelf.show_image sd_setImageWithURL:KUrlString(weakSelf.videoData[@"image"]) placeholderImage:weakSelf.show_image.image];
                weakSelf.show_time.text = weakSelf.videoData[@"durations_txt"];
                weakSelf.show_content.text = weakSelf.videoData[@"introduce"];
                weakSelf.show_currTime.text = weakSelf.videoData[@"createtime_str"];
                weakSelf.show_paly.text = weakSelf.videoData[@"pv_txt"];
                weakSelf.show_comment.text = weakSelf.videoData[@"comment_num_txt"];
                weakSelf.show_like.text = weakSelf.videoData[@"like_num_txt"];
            }else{
                weakSelf.show_video_view.hidden = YES;
                weakSelf.upView.hidden = NO;
            }
            weakSelf.mainView.hidden = NO;
            if([[QZUserInfoModel share].creator_refund_switch intValue] == 1){
                weakSelf.qe_height.constant = 215;
                weakSelf.qe_showView.hidden = NO;
                if([[QZUserInfoModel share].iscreator intValue] == 1){
                    weakSelf.qe_qd_number.hidden = NO;
                    weakSelf.qe_qd_number.text = [NSString stringWithFormat:@"%@/%@",data[@"continuousDays"],data[@"totalContinuousDays"]];
                    if([data[@"today_is_sign"] intValue] == 1){
                        [weakSelf.qe_qd_status setTitle:@"已完成" forState:UIControlStateNormal];
                        weakSelf.qe_qd_status.backgroundColor = ColorHex_Alpha(@"f2f3f4", 1);
                        [weakSelf.qe_qd_status setTitleColor:ThreeColor forState:UIControlStateNormal];
                        weakSelf.qe_qd_status.userInteractionEnabled = NO;
                    }else{
                        [weakSelf.qe_qd_status setTitle:@"签到" forState:UIControlStateNormal];
                        weakSelf.qe_qd_status.backgroundColor = MainColor;
                        [weakSelf.qe_qd_status setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
                        weakSelf.qe_qd_status.userInteractionEnabled = YES;
                    }
                    
                    if([data[@"today_active_time"] intValue] > 1800){
                        [weakSelf.qe_hy_status setTitle:@"已完成" forState:UIControlStateNormal];
                        weakSelf.qe_hy_status.backgroundColor = ColorHex_Alpha(@"f2f3f4", 1);
                        [weakSelf.qe_hy_status setTitleColor:ThreeColor forState:UIControlStateNormal];
                        weakSelf.qe_hy_status.userInteractionEnabled = NO;
                    }else{
                        [weakSelf.qe_hy_status setTitle:@"未完成" forState:UIControlStateNormal];
                        weakSelf.qe_hy_status.backgroundColor = MainColor;
                        [weakSelf.qe_hy_status setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
                        weakSelf.qe_hy_status.userInteractionEnabled = YES;
                    }
                    
                }else{
                    weakSelf.qe_qd_number.hidden = YES;
                    [weakSelf.qe_qd_status setTitle:@"开通" forState:UIControlStateNormal];
                    weakSelf.qe_qd_status.backgroundColor = MainColor;
                    [weakSelf.qe_qd_status setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
                    weakSelf.qe_qd_status.userInteractionEnabled = YES;
                    
                    [weakSelf.qe_hy_status setTitle:@"开通" forState:UIControlStateNormal];
                    weakSelf.qe_hy_status.backgroundColor = MainColor;
                    [weakSelf.qe_hy_status setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
                    weakSelf.qe_hy_status.userInteractionEnabled = YES;
                }
            }else{
                weakSelf.qe_height.constant = 0;
                weakSelf.qe_showView.hidden = YES;
            }
           
        }else{
            [YBMsgPop showPop:msg];
        }
    }];
}
-(void)showTextViewAddShowViewTo2{
    UIView * showTextViewViewTo1 = [[UIView alloc]initWithFrame:CGRectMake(0, 20, 100, 360)];
    showTextViewViewTo1.backgroundColor = [UIColor whiteColor];
    showTextViewViewTo1.layer.cornerRadius = 8;
       UILabel * oldshowSSSSTip = [[UILabel alloc]init];
    oldshowSSSSTip.clipsToBounds = YES;
    oldshowSSSSTip.text = @"kass显示区";
    oldshowSSSSTip.textColor = ColorHex(@"#f0f0f0");
    oldshowSSSSTip.textAlignment = NSTextAlignmentCenter;
    oldshowSSSSTip.font = [UIFont systemFontOfSize:28];
    oldshowSSSSTip.hidden = YES;
    [self.view addSubview:oldshowSSSSTip];
    [self.view addSubview:showTextViewViewTo1];
    
    UIImageView * showTextViewimgTo2 = [[UIImageView alloc]initWithFrame:CGRectMake(K_AUTOLAYOUT_W(157.5), K_AUTOLAYOUT_W(260), K_AUTOLAYOUT_W(60), K_AUTOLAYOUT_W(60))];
    showTextViewimgTo2.layer.cornerRadius = K_AUTOLAYOUT_W(30);
    showTextViewimgTo2.clipsToBounds = YES;
    showTextViewimgTo2.contentMode = UIViewContentModeScaleAspectFill;
    showTextViewimgTo2.hidden = YES;
    [showTextViewViewTo1 addSubview:showTextViewimgTo2];
    
    UILabel *  showTextViewimgTo3 = [[UILabel alloc]initWithFrame:CGRectMake(K_AUTOLAYOUT_W(15), K_AUTOLAYOUT_W(35), K_AUTOLAYOUT_W(345), K_AUTOLAYOUT_W(25))];
    showTextViewimgTo3.font = FontBold(18);
    showTextViewimgTo3.textColor = ThreeColor;
    showTextViewimgTo3.textAlignment = NSTextAlignmentCenter;
    showTextViewimgTo3.hidden = YES;
    [showTextViewViewTo1 addSubview:showTextViewimgTo3];
}
- (NSString *)showTextViewGetNowTimerTo3{
    NSDateFormatter *showTextViewGetNowFa = [[NSDateFormatter alloc] init];
    [showTextViewGetNowFa setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    return [showTextViewGetNowFa stringFromDate:[NSDate date]];
}
- (void)showDaoQiTimeTap{
    self.timerNumber = self.timerNumber-1;
    int h = self.timerNumber/3600;
    int m = (self.timerNumber%3600)/60;
    int s = self.timerNumber%60;
    self.daoqi_time.text = [NSString stringWithFormat:@"%02d:%02d:%02d后到期",h,m,s];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self showDaoQiTimeTap];
    });
}
- (IBAction)openCreatorTap:(id)sender {
    if([[QZUserInfoModel share].iscreator intValue] == 1){
        DJMyWallVC * wall = [[DJMyWallVC alloc]init];
        [self.navigationController pushViewController:wall animated:YES];
    }else{
        DJMyOpenCreatorVC * open = [[DJMyOpenCreatorVC alloc]init];
        [self.navigationController pushViewController:open animated:YES];
    }
}
- (IBAction)playVideoTap:(id)sender {
    QZMyDetailsPlayVC * play = [[QZMyDetailsPlayVC alloc]init];
    QZVideoModel * model = [[QZVideoModel alloc]init];
    [model setValuesForKeysWithDictionary:self.videoData];
    model.nickname = self.nickname;
    play.videoArr = [[NSMutableArray alloc]initWithObjects:model, nil];
    play.videoPlayIndex = 0;
    [self.navigationController pushViewController:play animated:YES];
}

- (IBAction)upVideoTap:(id)sender {
    DJUploadVC * upload = [[DJUploadVC alloc]init];
    upload.modalPresentationStyle = UIModalPresentationFullScreen;
    [self presentViewController:upload animated:YES completion:nil];
}
- (IBAction)qingdaoTap:(UIButton *)sender {
    if([[QZUserInfoModel share].iscreator intValue] == 0){
        DJMyOpenCreatorVC * open = [[DJMyOpenCreatorVC alloc]init];
        [self.navigationController pushViewController:open animated:YES];
    }else{
        if([sender.titleLabel.text isEqualToString:@"签到"]){
            QZHongBaoDetailsVC * details = [[QZHongBaoDetailsVC alloc]init];
            [self.navigationController pushViewController:details animated:YES];
        }
    }
}
- (IBAction)huoyueTap:(UIButton *)sender {
    if([[QZUserInfoModel share].iscreator intValue] == 0){
        DJMyOpenCreatorVC * open = [[DJMyOpenCreatorVC alloc]init];
        [self.navigationController pushViewController:open animated:YES];
    }else{
        if([sender.titleLabel.text isEqualToString:@"未完成"]){
            [QZUserInfoModel tabbarChangeIndex:0];
        }
    }
}


- (void)showTextViewSubViewToViewTo2:(UIView * )subView{

    UIView * showTextViewSubViewTo2 = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    showTextViewSubViewTo2.clipsToBounds = YES;
    [subView addSubview:showTextViewSubViewTo2];
    UILabel * showTextViewSubViewLabelTo3 = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 100)];
    showTextViewSubViewLabelTo3.text = @"ppppp88888";
    [showTextViewSubViewTo2 addSubview:showTextViewSubViewLabelTo3];
    
    UIImageView * showTextViewSubViewTo3 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 100, 100)];
    [subView addSubview:showTextViewSubViewTo3];

}

@end
